// an empty interface
interface Foo {}

// an interface with only one supertype (Bar === Foo)
export interface Bar extends Foo {}

// an interface with an empty list of supertypes
export interface Baz {}


interface Foo extends Array<number> {}
//output: type Foo = Array<number>

interface Foo extends Array<number | {}> {}
//output: type Foo = Array<number | {}>

interface Bar {
  bar: string;
}
interface Foo extends Array<Bar> {}
/*output:
interface Bar {
  bar: string;
}
type Foo = Array<Bar>
*/

type R = Record<string, unknown>;
interface Foo extends R {}

/*output:
type R = Record<string, unknown>;
type Foo = R
*/

interface Foo<T> extends Bar<T> {}
//output: type Foo<T> = Bar<T>

declare module FooBar {
  type Baz = typeof baz;
  export interface Bar extends Baz {}
}
/*output:
declare module FooBar {
  type Baz = typeof baz;
  export type Bar = Baz
}
*/

//options: [{ allowSingleExtends: false }],
interface Foo {
  props: string;
}
interface Bar extends Foo {}
class Baz {}
/*output:
interface Foo {
  props: string;
}

type Bar = Foo

class Baz {}
*/

interface Foo {
  props: string;
}
interface Bar extends Foo {}
class Bar {}

interface Foo {
  props: string;
}
interface Bar extends Foo {}
const bar = class Bar {};
/*output:
interface Foo {
  props: string;
}

type Bar = Foo

const bar = class Bar {};
*/

interface Foo {
  name: string;
}

interface Bar extends Foo {}
/* output:
interface Foo {
  name: string;
}

type Bar = Foo
*/